package com.yuhao.init.model.vo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author: yuhao
 * @Date: 2024/5/7 12:14
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class WallPaperVo {
    /**
     * 真正壁纸表
     */
    @TableId(value = "_id",type = IdType.ASSIGN_ID)
    private Long _id;

    /**
     * 壁纸分类id
     */
    private Long classid;

    private String classifyName;

    /**
     * 发布者昵称
     */
    private String nickname;

    /**
     * 评分
     */
    private String score;

    /**
     * webp缩略图大小，可以转换成jpg
     */
    private String smallPicurl;

    /**
     * 标签组
     */
    private List<String> tabs = new ArrayList<>();

    /**
     * 壁纸描述
     */
    private String description;

    /**
     *创建时间
     */

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     *更新时间
     */

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

}
